<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="/bigjo/js/jquery.js"></script>
<link rel="stylesheet" type="text/css" href="/bigjo/css/eboard.css">
<title>EVENT</title>
</head>
<script type="text/javascript">
	jQuery.noConflict();
	jQuery(document).ready(function() {
		jQuery("#eboardinsert").click(function() {
			var idx = document.URL.indexOf("bigjo");
			var str = document.URL.substring(0, idx + 5);
			jQuery("#eboardmain").load(str + "/eboardInsert.eboard");
		});

		jQuery("#ebdelete").click(function() {
			var idx = document.URL.indexOf("bigjo");
			var str = document.URL.substring(0, idx + 5);
			jQuery("#eboardmain").load(str + "/eboarddelete.eboard");
		});

	});
</script>

<body>
	<jsp:include page="/upMenu.main"></jsp:include>
	<div id="eboardmain" align="center">
		<table border="1" style="width: 700px">
			<thead>
				<tr>
					<th colspan="6">EVENT 게시판</th>
				</tr>
				<tr>
					<td align="center">번호</td>
					<td align="center">제목</td>
					<td align="center">조회수</td>
				</tr>
			</thead>
			<tbody>
				<c:forEach var="ad" items="${eboardlist}">
					<tr>
						<td align="center">${ad.eb_no} 번</td>
						<td align="center"><a
							href="eboarddetail.eboard?eb_no=${ad.eb_no}">${ad.eb_title}</a></td>
						<td align="center">${ad.eb_count}</td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
		<c:choose>
			<c:when test="${sessionScope.member == 'admin' }">
				<input type="submit" name="eboardinsert" id="eboardinsert" value="글쓰기 입력 ">
			</c:when>

		</c:choose>
		${pageInfo.pagingHtml}
	</div>
</body>
</html>